* use LARR Data (final for replication).dta


*Note: This replication file is for "The Benefits of Balance", published in Latin American Research Review
*I updated the data for the article due to the long time frame between submission (fall 2013) 
*and publication (spring 2016). *New data became availabile during that timeframe and it is now incorporated 
*into my models. The results for the central explanatory variables remain consistent in terms of 
*statistical significance, direction, and general magnitude. However, some of the coefficients do change in 
*magnitude and statistical significance, which would alter some of the tables and calculations 
*in the analysis section. The main points, evidence supporting my arguments, and implications are broadly the same. 

xtreg ruleoflaw polconiii logGDP fhPR partyorientation ethfrac, vce(robust)

*this model provides evidence for the influence of politica constraints and right-wing presidents on rule of law perceptions.

xtreg ruleoflaw polconiii logGDP fhPR partyorientation ethfrac, fe vce(robust)

*the model above provides the same evidence, but with fixed effects (fixed effects drops ef because of lack of variation)


xtreg ruleoflaw L.ruleoflaw polconiii logGDP fhPR partyorientation ethfrac, fe vce(robust)

*the model above uses a lagged DV and fixed effects as a robustness check (though there is a debate as to whether
*a lagged DV is appropriate with a fixed effects estimator)


xtabond ruleoflaw fhPR polconiii partyorientation logGDP ethfrac, lags(1) endog(polconiii) artests(2)

*this model uses arellano bond dynamic panel estimation and 
*provides evidence for Political constraints' positive influence on rule of law perceptions, while addressing
*the potential endogenity of political constraints. 

xtreg ruleoflaw partyinteraction polconiii logGDP fhPR partyorientation ethfrac, vce(robust)

*interaction between partyorientation and political constraints




*the next models use gross fixed capital formation as a dependent variable

xtreg gfcfpercentgdp polconiii globalgrowth regimestability trade partyorientation ethfrac fhPR, vce(robust)

*polconiii is a statistically significant determinant of GFCF

xtreg gfcfpercentgdp polconiii globalgrowth regimestability trade partyorientation ethfrac fhPR, fe vce(robust)

*the model above provides the same evidence, but with fixed effects, which drops ef due to lack of variance, as above

xtabond gfcfpercentgdp polconiii globalgrowth regimestability trade partyorientation ethfrac fhPR, lags(1) artests(2)

*the model above provides very similar results for political constraints, but using arellano bond techniques to address potential endogeneity.
*many of the variables that are not significant in the fixed effects model are now significant. 
